package com.liuyi.netty.im.lychat.config.base;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.liuyi.rapid.develop.mybatis.plus.base.IBaseService;

public interface BaseController<T, S extends IBaseService<T>> {

    S server();

    default QueryWrapper<T> q(){
        return server().q();
    }

    default UpdateWrapper<T> u(){
        return server().u();
    }

    default String saveOrUpdateMsg(boolean update) {
        return update ? "修改成功" : "新增成功";
    }
}
